<template>
	<view class="columnbox wdh-100 content">
		<view class="o-box wdh-100 rowbox spb" v-for="(item,index) in list" :key='index'>
			<image src="/static/img/logo.jpeg" mode="aspectFill" class="o-img"></image>
			<view class="columnbox o-detail">
				<view class="rowbox wdh-100 spb">
					<view class="name">{{item.comboName}}</view>
					<view class="status">核销成功</view>
				</view>
				<view class="wdh-100 status">
					{{item.createTime}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pageNum: 1,
				list: [],
				total: 0
			};
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			if (this.list.length < this.total) {
				this.pageNum++
				this.getList()
			}
		},
		methods: {
			getList() {
				this.$req.get('/xcx/comboWriteOff/list', {
					pageSize: 20,
					pageNum: this.pageNum
				}).then(res => {
					this.list = this.list.concat(res.data.rows)
					this.total = res.data.total
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		min-height: 100vh;
		justify-content: flex-start;
		background: #F7F7F7;
		padding: 20rpx;
	}

	.o-box {
		margin-bottom: 20rpx;
		padding: 20rpx;
		background: #fff;
		border-radius: 10rpx;
	}

	.o-img {
		width: 100rpx;
		height: 100rpx;
		border-radius: 10rpx;
	}

	.o-detail {
		width: calc(100% - 120rpx);
		height: 90rpx;
		justify-content: space-between;

		& .name {
			font-size: 32rpx;
		}

		& .status {
			font-size: 28rpx;
			color: #6e7071;
		}
	}
</style>